//
//  ObjectUtil.m
//  BlocksKitSample
//
//  Created by 李勇 on 2018/9/9.
//  Copyright © 2018年 李勇. All rights reserved.
//

#import "ObjectUtil.h"
@import BlocksKit;

static const char* key;
@implementation ObjectUtil

+(void)test{
    [ObjectUtil testNSObjectAssociateValue];
    [ObjectUtil testPerformQueue];
}


+(void)testNSObjectAssociateValue{
    NSObject *obj = [[NSObject alloc] init];
    [obj bk_associateValue:@"aa" withKey:key];
    id value = [obj bk_associatedValueForKey:key];
    NSLog(@"obj associate value:%@",value);
}

+(void)testPerformQueue{
    NSArray *arr = @[@"a",@"b",@"c"];
    [arr bk_performBlock:^(id obj) {
        NSLog(@"the item in arr :%@",obj);
    } afterDelay:1];
}

@end
